package com.by.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author ServivE
 * @version 0.1
 * @className GoodsMapper
 * @description
 * @date 2024/10/24 14:00
 * @since jdk17
 */
@Mapper
public interface GoodsMapper {
    /**
     * 查询所有秒杀的商品
     * @return
     */
    List<Map> query();

    /**
     * 更新库存
     * @param goodsId
     * @param num
     * @return
     */
    int updateStock(@Param("goodsId") int goodsId, @Param("num") int num);
}
